WADUTILS v1.0 README for: INFO MAKEWAD BREAKWAD PLEASE NOTE: Apogee(tm) and 3DRealms(tm) do not in ANY WAY support these programs; they are not the authors. PLEASE do not mail them any questions about this software; instead, direct all inquiries to the author, Derek Greentree, . Thank you! WADUTILS v1.0, is, of course, freeware! You may distribute these files as long as they are in their original form: complete, intact, and unaltered. The package includes: INFO.EXE, MAKEWAD.EXE, BREAKWAD.EXE, DOS4GW.EXE, and README.TXT P.S. If you make external wadfiles with this and distribute them in a .RTC or .RTL level pack, please include the name of this package in the editor(s) used section of the author file(RT?_AUTH.TXT); make a simple programmer(me) happy. TOC {1} What are these programs? {2} The Resource Textfile {3} Building PWADs for use with new RotT levels(.RTLs) and COMM-BAT levels (.RTCs)! {4} Where do I go from here? {5} About the Author/How to Contact the Author {1} What are these programs? INFO is a program which displays the information tables for a Rise of the Triad(tm) WADfile. Its usage is: INFO where is the name of a WADfile in RotT format(i.e. DARKWAR.WAD). INFO will pause at every new screen. When INFO pauses, press "Q"(or "q") to quit, or any other key to continue the listing. MAKEWAD is a program which will generate a RotT WADfile. Its usage is : MAKEWAD where is a resource textfile(see below) and is the name of the WADfile to be generated. MAKEWAD will also optionally take a fourth parameter. If you enter the letter "r" on the command line after , MAKEWAD will delete the resource after it builds it into the wadfile. BREAKWAD is a program which will decompose a RotT WADfile. Its usage is: BREAKWAD where is the name of the WADfile to be decomposed, and is a resource textfile(see below), which will be built upon running. {2} The Resource Textfile This is a very simple textfile which tells MAKEWAD the number of lumps in the WADfile to be made, and the filename of each of those lumps. A lump is a file resource. For example, when RotT loads a texture called WALL1, this texture is a lump. The resource textfile has the following format: numlumps(N) filename1 filename2 . . . filenameN So, if you wanted to make a new WADfile with only 2 resources, and you wanted the data for those resources to come from the files STEVE.TXT and JOHN.TXT, then your resource file would look like this: 2 STEVE.TXT JOHN.TXT The resource textfile is very rigid. Comments are NOT supported, at least not in this version. Be sure that when you make your resource textfile you adhere to the format above, or you will get unpredictible results. BREAKWAD makes a resource file exactly as this format specifies. However, there are complications, namely : 1) RotT stores the id for their lumps as a string with 8 places; therefore, the extensions are automatically cut off files when they are made into a lump, and null characters are added to the first part of the filename. Therefore, for our example resfile above, a wad would be generated having two lumps with the id's(ignore the quote marks): "STEVE " and "JOHN ".(the spaces here are actually null chars) 2) On account of number 1, whenever you run BREAKWAD on a wadfile, the original extension of the files generated is unknown, so BREAKWAD filters out nulls and appends ".XXX". BREAKWAD will always use ".XXX" unless a file of the same name already exists. For example, in DARKWAR.WAD, the resource TSPHERE1 appears twice. BREAKWAD will write the first one as TSPHERE1.XXX, and the second as TSPHERE1.XXZ. Again using the sample WADfile described above, BREAKWAD would create two files, STEVE.XXX and JOHN.XXX . Also, the resource file generated would be: 2 STEVE.XXX JOHN.XXX The next version of these utilities(if there is one) should have a little smarter extension control. SPECIAL NOTE: Since the .RTS files used in Rise of the Triad and Duke Nukem 3D are, for all technical purposes, WADfiles, the utils can be used to make and break Remote Ridicule Files. {3} Building PWADs for use with new RotT levels(.RTLs) and COMM-BAT levels(.RTCs) Yes, now you can distribute new textures, sounds, songs, etc. with your Rise of the Triad Levels. RotT is set up so that a properly generated and formatted WADfile with a IWAD id can be loaded (with the command syntax "ROTT file "), and if RotT finds a resource it needs, it will use one from the external wad file, if it is present. The upshot of all this is that you can make a WADfile with altered resources and distribute it with your .RTC and .RTL level packs. For an example of the usefulness of this feature, consider the following: You have made a level pack with an unusual theme. The only problem is that you think some different sounds would really add to the atmosphere of your pack. Now, you can simply record a new .VOC file, and use it in an add-on wad. For example, the resource DA_SAY1.XXX, from DARKWAR.WAD, is a .VOC file that is played when you are fighting the boss General Darian. Replace this file, and RotT will play YOUR .VOC file! To do this, you would simply create a new wadfile with this resource by running MAKEWAD with a textfile like this: 3 DIGISTRT.XXX DA_SAY1.VOC DIGISTOP.XXX The DIGISTRT/DIGISTOP are the section headers, and are generated from zero-length files. I am unsure whether or not they are required, I just use them because RotT does. For more exmaples of what these resources are, see the next section. The SETUP utility distributed with RotT supports command-line option passing. So, to use both a new .RTC file and a new WADfile, one would type SETUP file mywad.wad (mywad is the name of your wadfile, duh) and then proceed through the menu system normally to use an alternate level file. {4} Where do I go from here? Take a look at the resource textfile generated by breaking down a WADfile, like DARKWAR.WAD. You will see groups of files encased by markers, which are written to your hard drive as zero-length files. Examples are WALLSTRT, WALLSTOP, ANIMSTRT, ANIMSTOP, etc. Below I will discuss the most easily "editable" of these files. WALLSTRT/WALLSTOP Files between these headers are raw screen data; that's it. If you can program, then if you open these files and write them straight to video memory(after setting the palette), you will see that they are wall textures. DIGISTRT/DIGISTOP These are sounds used in RotT. They are standard .VOC files, and can be edited and replaced as you wish. SONGSTRT/SONGSTOP These are MIDI songs. Once again, they can be replaced. ( I used the Dopefish theme, and a bunch of other neat MIDIs ) "SPECIAL" resources PAL.XXX - This is the palette used in RotT LICENSE.XXX - This is the legal stuff for RotT(don't mess with it). WARNING: Feel free to change the file extensions freely. However, a reminder, if you change the file NAME, you are also changing its id in the WADfile. ---- Other files in the game are discussed in the file HACKROTT.COM, which I strongly suggest you read. Any industrious programmer should be able to write a simple editor for the graphics resource files. (If anybody has plans to do this, please let me know.) {5} About the Author/Contacting the Author I am Derek Greentree, also the author of the RotT FAQ v3.0. I can be reached via email at derekg@icanect.net or via the WWW at http://www.icanect.net/~derekg/ Be aware that for the WWW site above you will need a frames capable browser. Miscellaneous technical info you probably don't care about: These programs were written in C and compiled with Watcom C/C++ v10.5, and they use Tenberry Software's DOS/4GW Protected Mode Runtime Extender. "And now the questions. Do I kill them? become their friend? Do I eat them? raw or well done? Do I trick them? I don't think they're that dumb! Do I join them? I guess that's the one." Rise of the Triad is (c)1995 Apogee Software Ltd. These programs are (c)1996 Derek Greentree. DOS/4GW (c)1990-1994 Rational Systems Inc. DISCLAIMER: Even though it is very unlikely, I cannot be held responsible for any damage caused by using these programs.